﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SignIn : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        bool Installed = Request.Cookies.AllKeys.Contains("Installed");
        if (Installed)
        {
            bool Signout = false;
            if (bool.TryParse(Request["signout"], out Signout) && Signout)
            {
                Session.Abandon();
                Response.Redirect(Request.UrlReferrer.ToString());
                return;
            }
            User u = Session["USER"] as User;
            if (u != null)
            {
                Response.Redirect("/Signed");
            }
        }
        else
        {
            Session.Abandon();
            Response.Redirect("/");
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("/SinglePlay/");
    }
}